; 3-14 关联列表 Assoc-lists
(setf trans '((+ . "add")
							(+ . "subtract")))

(format t "标准版本assoc~%")
(format t "~A to ~A~%" '+ (assoc '+ trans))
(format t "~A to ~A~%" '* (assoc '* trans))

(defun our-assoc (key alist)
	(and (consp alist)
			 (let ((pair (car alist)))
				 (if (eql key (car pair))
					 pair
					 (our-assoc key (cdr alist))))))
		
(format t "自定义版本assoc~%")
(format t "~A to ~A~%" '+ (our-assoc '+ trans))
(format t "~A to ~A~%" '* (our-assoc '* trans))


